home *** CD-ROM | disk | FTP | other *** search
/ Internet Publisher's Toolbox 2.0 / Internet Publisher's Toolbox.iso / internet / ntserver / wtsource / sockets.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-01  |  1.3 KB  |  60 lines

  1. /* WIDE AREA INFORMATION SERVER SOFTWARE:
  2.    No guarantees or restrictions.  See the readme file for the full standard
  3.    disclaimer.
  4.  
  5.    5.29.90  Harry Morris, morris@think.com
  6. */
  7.  
  8. /* Copyright (c) CNIDR (see ../COPYRIGHT) */
  9.  
  10.  
  11. #ifndef sockets_h
  12. #define sockets_h
  13.  
  14. #include "cdialect.h"
  15. #include "cutil.h"
  16.  
  17. #ifndef THINK_C
  18. #ifndef M_XENIX
  19. #ifndef WIN32
  20. #include <sys/types.h>
  21. #include <sys/socket.h>
  22. #include <netinet/in.h>
  23. #include <netdb.h>
  24. #include <arpa/inet.h>
  25. #endif /* WIN32 */
  26. #endif /* M_XENIX */
  27. #endif /* THINK_C */
  28. #ifdef WIN32
  29. #include <winsock.h>
  30. #include "winsock-local.h"
  31. #endif
  32.  
  33. /*---------------------------------------------------------------------------*/
  34.  
  35. #ifdef __cplusplus
  36. /* declare these as C style functions */
  37. extern "C"
  38.     {
  39. #endif /* def __cplusplus */
  40.  
  41. void open_server _AP((long port,long* socket,long size));
  42. void accept_client_connection _AP((long socket,FILE** file));
  43. void close_client_connection _AP((FILE* file));
  44. void close_server _AP((long socket));
  45. FILE *connect_to_server _AP((char* host_name,long port));
  46. void close_connection_to_server _AP((FILE* file));
  47. char *mygethostname _AP((char *hostname, long len));
  48.  
  49. #ifdef __cplusplus
  50.     }
  51. #endif /* def __cplusplus */
  52.  
  53. /*---------------------------------------------------------------------------*/
  54.  
  55. #endif
  56.  
  57.  
  58.  
  59.  
  60.